home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 21 / PC Format CD-ROM Collection 21 (1995-12)(Future Publishing)(GB)[issue 51].iso / resource / turtbush.poc < prev    next >
Text File  |  1991-03-15  |  649b  |  41 lines

  1.  
  2. int sw, sh;        // screen dimensions
  3.  
  4. branch(double len, int color,double spread,int thick)
  5. {
  6. double x,y,a;
  7.  
  8. SetColor(color);
  9. SetBrushSize(thick);
  10. Move(len);
  11. if ((len *= 0.6666667) >= 1)
  12.     {
  13.     if (thick > 0)
  14.         thick -= 1;
  15.     spread *= 0.90;
  16.     color += 1;
  17.     Where(&x,&y,&a);
  18.     Right(spread);
  19.     branch(len,color,spread,thick);
  20.     MoveTo(x,y,a);
  21.     Left(spread);
  22.     branch(len,color,spread,thick);
  23.     }
  24. }
  25.  
  26. TurtFunc(double time, void *v)
  27. {
  28. Home();
  29. PenUp();
  30. Left(90);
  31. Back(sh/2);;
  32. PenDown();
  33. branch(128.0*sh/400.0*time,90,80*time,10);
  34. }
  35.  
  36. main()
  37. {
  38. GetSize(&sw,&sh);
  39. OverTime(TurtFunc, NULL);
  40. }
  41.